package cn.tianya.irock.util;

import cn.tianya.irock.bll.Users;
import cn.tianya.irock.enums.ApplicationExceptionType;
import cn.tianya.irock.exceptions.ApplicationException;
import freemarker.template.SimpleSequence;

public class I18n extends I18nBase {
	public static String getString(String name, SimpleSequence params) {
		try {
			return I18nBase.getString(Users.getUser().getLanguage(), name, params.toList().toArray());
		} catch (Exception e) {
			throw new ApplicationException(ApplicationExceptionType.UnknowError, e.getMessage());
		}
	}
}
